package part5;

/**
 * @author wcj
 * @Date 2021/5/13 15:45
 * @Version 1.0
 */
public class Part56 {
    int petalCount = 0;
    String s = "initial value";

    public Part56(int petals){
        petalCount = petals;
        System.out.println("petalCount="+petalCount);
    }

    public Part56(String ss){
        System.out.println("s="+ss);
        s = ss;
    }

    public Part56(String s,int petals){
        this(petals);
        this.s = s;
        System.out.println("String & int args");
    }

    public Part56(){
        this("hi",47);
        System.out.println("默认构造器");
    }

    public void printPetalCount(){
//        this(11);
        System.out.println("petalCount="+petalCount+",s="+s);
    }

    public static void main(String[] args) {
        Part56 part56 = new Part56();
        part56.printPetalCount();
    }
}
